package com.tjrac.generalpermissions.filter;

import com.tjrac.filter.aspect.HandlerInterceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * JPGFilter 图片权限管理
 *
 * @author : xziying
 * @create : 2020-12-02 20:23
 */
public class JPGFilter extends HandlerInterceptor {

    @Override
    public void permissionIsEmpty(HttpServletRequest request, HttpServletResponse response) throws Exception {
        request.getRequestDispatcher("/error/nojpg.jpg").forward(request, response);
    }

    @Override
    public void handler(HttpServletRequest request, HttpServletResponse response) throws Exception {
        request.getRequestDispatcher("/error/nojpg.jpg").forward(request, response);
    }
}
